李沐课程中:from d2l import torch as d2l报错

您所在的位置:网站首页 d2l 李沐 李沐课程中:from d2l import torch as d2l报错

李沐课程中:from d2l import torch as d2l报错

#李沐课程中:from d2l import torch as d2l报错| 来源: 网络整理| 查看: 265

问题描述:

我是用pycharm跑的李沐大神的代码,代码是从GitHub(https://github.com/Miraclelucy/dive-into-deep-learningicon-default.png?t=M276https://github.com/Miraclelucy/dive-into-deep-learning)借鉴过来的,想运行的时候,这句报错了:

from d2l import torch as d2l

应该是没有导入d2l的包,网上看了半天也没有找到直接的解决方式,很奇怪。

解决办法:

安装对应的包就好了。

1.打开conda的prompt;

2.激活你想要使用的环境,即activate;

3.激活环境后,输入命令 pip install -U d2l

4.回车安装完成,代码跑通



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3